Telegram Group & Telegram Channel
Задача с кодом. Кратна ли цифра цифре слева?

Напишите функцию, которая будет принимать число n и проверять, кратна ли каждая его цифра цифре, стоящей слева от нее. Верните массив булевых значений результатов проверок.

Примеры:
divisible_by_left(73312) ➞ [False, False, True, False, True]
# слева от 7 нет элемента = False
# 3/7 = False
# 3/3 = True
# 1/3 = False
# 2/1 = True
divisible_by_left(1) ➞ [False]
divisible_by_left(635) ➞ [False, False, False]

Примечание: массив всегда будет начинаться с False, поскольку слева от первой цифры ничего нет.

Решение на нашем сайте.

#задача #coding



tg-me.com/pythonist_ru/2396
Create:
Last Update:

Задача с кодом. Кратна ли цифра цифре слева?

Напишите функцию, которая будет принимать число n и проверять, кратна ли каждая его цифра цифре, стоящей слева от нее. Верните массив булевых значений результатов проверок.

Примеры:
divisible_by_left(73312) ➞ [False, False, True, False, True]
# слева от 7 нет элемента = False
# 3/7 = False
# 3/3 = True
# 1/3 = False
# 2/1 = True
divisible_by_left(1) ➞ [False]
divisible_by_left(635) ➞ [False, False, False]

Примечание: массив всегда будет начинаться с False, поскольку слева от первой цифры ничего нет.

Решение на нашем сайте.

#задача #coding

BY Pythonist.ru - образование по питону


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/pythonist_ru/2396

View MORE
Open in Telegram


Pythonist ru образование по питону Telegram | DID YOU KNOW?

Date: |

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

How to Invest in Bitcoin?

Like a stock, you can buy and hold Bitcoin as an investment. You can even now do so in special retirement accounts called Bitcoin IRAs. No matter where you choose to hold your Bitcoin, people’s philosophies on how to invest it vary: Some buy and hold long term, some buy and aim to sell after a price rally, and others bet on its price decreasing. Bitcoin’s price over time has experienced big price swings, going as low as $5,165 and as high as $28,990 in 2020 alone. “I think in some places, people might be using Bitcoin to pay for things, but the truth is that it’s an asset that looks like it’s going to be increasing in value relatively quickly for some time,” Marquez says. “So why would you sell something that’s going to be worth so much more next year than it is today? The majority of people that hold it are long-term investors.”

Pythonist ru образование по питону from in


Telegram Pythonist.ru - образование по питону
FROM USA